package com.hsjk.szwj.module.pay.service;

import com.hsjk.szwj.module.pay.controller.app.refund.vo.RefundOrderReqVO;
import com.hsjk.szwj.module.pay.dal.dataobject.config.ChannelRetMsg;
import com.hsjk.szwj.module.pay.dal.dataobject.config.MchAppConfigContext;
import com.hsjk.szwj.module.pay.dal.dataobject.order.PayOrderDO;
import com.hsjk.szwj.module.pay.dal.dataobject.order.RefundOrderDO;

/**
 * @author chenjiawei
 * @desc 调起上游渠道侧退款接口
 * @Date 2023/08/25 00:02
 **/
public interface IRefundService {
    /**
     * 获取到接口code
     **/
    String getIfCode();

    /**
     * 前置检查如参数等信息是否符合要求， 返回错误信息或直接抛出异常即可
     */
    String preCheck(RefundOrderReqVO bizRQ, RefundOrderDO refundOrder, PayOrderDO payOrder);

    /**
     * 调起退款接口，并响应数据；  内部处理普通商户和服务商模式
     **/
    ChannelRetMsg refund(RefundOrderReqVO bizRQ, RefundOrderDO refundOrder,
                         PayOrderDO payOrder, MchAppConfigContext mchAppConfigContext) throws Exception;

    /**
     * 退款查单接口
     **/
    ChannelRetMsg query(RefundOrderDO refundOrder, MchAppConfigContext mchAppConfigContext) throws Exception;

}
